package com.zl.csMall.mine.history.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zl.csMall.mine.history.po.History;

import java.util.List;

public interface HistoryService extends IService<History> {

    /**
     * @description: 新增浏览记录
     * @param userId 用户ID
     * @param commodityId 商品ID
     * @author ChenNing
     * @date: 2025-10-21 13:44
     */
    boolean addHistory(long userId, long commodityId);

    /**
     * @description: 查询指定商品的浏览用户 按时间顺序
     * @param commodityId 商品ID
     * @return: 用户ID集合
     * @author ChenNing
     * @date: 2025-10-24 10:47
     */
    Page getUserIdByCommodityId(long commodityId, Page page);

}
